﻿#include "pch.h"
#include <iostream>
#include<opencv2\opencv.hpp>
#include<opencv2\dnn.hpp>
#include<opencv2\imgproc.hpp>
#include <iostream>
#include <cmath>

#include "MyModel.h"
using namespace std;
using namespace cv;




int main() {

	// 初始化
	String onnxName = "E:\\pytorch_refuse\\weights_res_01.pth.onnx";
	String imageName = "E:\\pytorch_refuse\\2.bmp";


	Mat img = cv::imread(imageName);

	MyModel mypredict;
	mypredict.loadModel(onnxName);

	mypredict.predict(img);

	mypredict.predict("E:\\pytorch_refuse\\0.bmp");
	mypredict.predict("E:\\pytorch_refuse\\1.bmp");


	imshow("image", img);
	waitKey(0);
	return 0;
}


